Skip to content

Feat/admin audit log#164

Merged
Sendi0011 merged 3 commits into
JointSave-org:mainfrom
Unclebaffa:feat/admin-audit-log
Jun 29, 2026
Merged

Feat/admin audit log#164
Sendi0011 merged 3 commits into
JointSave-org:mainfrom
Unclebaffa:feat/admin-audit-log

Conversation

@Unclebaffa

Copy link
Copy Markdown
Contributor

Summary of Completed Work

  1. Database Schema & RLS Lockdown (Commit 1):

    • Created the migration file 20260629000000_admin_actions.sql to add the admin_actions table, enabled Row Level Security (RLS), and added a select-public policy. Anon-key client-side writes are blocked.
    • Updated the Database TypeScript interfaces in supabase.ts to define the new table schema.
  2. Logging API & Hook Triggers (Commit 2):

    • Implemented the REST API route route.ts with POST (logging with transaction hash de-duplication) and GET (retrieval with server-side authorization checks).
    • Created unit tests in route.test.ts.
    • Wired triggers in group-actions.tsx to capture transaction hashes and call the logging endpoint on successful pause, unpause, add_member, and remove_member operations.
  3. UI Integration (Commit 3):

    • Built a beautiful React component admin-actions-log.tsx that retrieves logs and renders them with specific Lucide icons and description mapping.
    • Integrated the component on the group page page.tsx right underneath the general Activity Feed so all members can view it.

Please review the detailed walkthrough.md for full execution results and let me know if you need anything else!

Closes #141

@Sendi0011 Sendi0011 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LFG!

@Sendi0011 Sendi0011 merged commit 8ef058c into JointSave-org:main Jun 29, 2026
3 checks passed
@Unclebaffa Unclebaffa deleted the feat/admin-audit-log branch June 29, 2026 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add an admin action audit log

2 participants